;; dired-x, 忽略不感兴趣的文件

(defun dired-x-settings ()
  "Settings for `dired-x'."

  ;; add to dired hook
  (add-hook 'dired-mode-hook (lambda () (dired-omit-mode)))

  ;; set the omit file
  (when (>= emacs-major-version 21)
    (setq dired-omit-files (concat dired-omit-files "\\|^\\.\\|^semantic.cache$\\|^CVS$"))
    (if *win32*
        (setq dired-omit-files (concat dired-omit-files "\\|^_"))))

  (setq dired-omit-size-limit 1000000))

(eval-after-load "dired-x"
  `(dired-x-settings))

(provide 'init-dired-x)
